package com.thomas.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.thomas.dao.BlogDao;
import com.thomas.entity.Blog;
import com.thomas.service.BlogService;

/** 
 * @ClassName: BlogServiceImpl 
 * @Description: 博客Service实现类
 * @author thomas_liu  
 * @date 2017年5月6日 下午14:46:30 
 *  
 */
@Service("blogService")
public class BlogServiceImpl implements BlogService {
	
	@Autowired
	private BlogDao blogDao;

	public List<Blog> countList() {
		return blogDao.countList();
	}

	public List<Blog> list(Map<String, Object> map) {
		return blogDao.list(map);
	}

	public Long getTotal(Map<String, Object> map) {
		return blogDao.getTotal(map);
	}

	public Blog findById(Integer id) {
		return blogDao.findById(id);
	}

	public Integer update(Blog blog) {
		return blogDao.update(blog);
	}

	public Blog getLastBlog(Integer id) {
		return blogDao.getLastBlog(id);
	}

	public Blog getNextBlog(Integer id) {
		return blogDao.getNextBlog(id);
	}

	public Integer add(Blog blog) {
		return blogDao.add(blog);
	}

	public Integer delete(Integer id) {
		return blogDao.delete(id);
	}

	public Integer getBlogByTypeId(Integer typeId) {
		return blogDao.getBlogByTypeId(typeId);
	}
	

	
}
